package com.nw.news.ui;

import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;

import com.nw.news.R;
import com.nw.news.ui.me.SettingActivity;
import com.yuan.base.framework.BaseFrameworkFragment;

/**
 * 我的
 */
public class MainMyFragment extends BaseFrameworkFragment {

	// --------------------------控件--------------------------
	private TextView tv_user_name;
	private TextView tv_user_phone;
	private ImageView iv_user_avatar;
	// --------------------------变量--------------------------

	@Override
	protected int getLayoutId() {
		return R.layout.fragment_main_my;
	}

	@Override
	protected void bindViews() {
		tv_user_name = findViewById(R.id.tv_user_name);
		tv_user_phone = findViewById(R.id.tv_user_phone);
		iv_user_avatar = findViewById(R.id.iv_user_avatar);
		setOnClickListener(R.id.rl_setting, v -> startActivity(new Intent(context, SettingActivity.class)));
	}

	@Override
	protected void initUI() {
//		UserInfo user = BaseUserManager.getUser();
//		tv_user_name.setText(user.getName());
//		tv_user_phone.setText(user.getPhone1());
//		BaseImageLoad.loadCircularAvatar(user.getSpic(), iv_user_avatar);
	}

	@Override
	public void onHiddenChanged(boolean hidden) {
		super.onHiddenChanged(hidden);
	}

	@Override
	public void onResume() {
		super.onResume();
		initUI();
	}


	@Override
	public void onStart() {
		super.onStart();
//		refreshChildData();
	}

}
